<header class="app-header navbar">
  <button class="navbar-toggler d-lg-none" type="button" appMobileSidebarToggler>
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand"></a>
  <button class="navbar-toggler d-md-down-none mr-auto" type="button" appSidebarToggler>
    <span class="navbar-toggler-icon"></span>
  </button>

  <ul [ngSwitch]="isAuthenticated()" class="nav navbar-nav ml-auto">

    <!-- admin -->
    <li *appHasAnyAuthority="'ROLE_ADMIN'" class="nav-item dropdown d-md-down-none" dropdown placement="bottom right">
      <a class="nav-link" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" dropdownToggle (click)="false">
        <i class="fa fa-briefcase"></i>
      </a>
      <div class="dropdown-menu dropdown-menu-right" *dropdownMenu aria-labelledby="simple-dropdown">
        <div class="dropdown-header text-center"><strong>Admin</strong></div>
        <a class="dropdown-item" routerLink="/admin/user-management" routerLinkActive="active"><i class="fa fa-user"></i> 用户管理</a>
        <a class="dropdown-item" routerLink="/admin/jhi-metrics" routerLinkActive="active"><i class="fa fa-bell-o"></i> 应用监控<span class="badge badge-info">42</span></a>
        <a class="dropdown-item" routerLink="/admin/jhi-health" routerLinkActive="active"><i class="fa fa-envelope-o"></i> 运行状态<span class="badge badge-success">42</span></a>
        <a class="dropdown-item" routerLink="/admin/jhi-configuration" routerLinkActive="active"><i class="fa fa-wrench"></i> 系统设置<span class="badge badge-danger">42</span></a>
        <a class="dropdown-item" routerLink="/admin/audits" routerLinkActive="active"><i class="fa fa-shield"></i> 登录审核<span class="badge badge-warning">42</span></a>
        <a class="dropdown-item" routerLink="/admin/logs" routerLinkActive="active"><i class="fa fa-file"></i> 日志<span class="badge badge-primary">42</span></a>
        <a class="dropdown-item" routerLink="/admin/docs" routerLinkActive="active"><i class="fa fa-tasks"></i> API<span class="badge badge-danger">42</span></a>
      </div>
    </li>

    <!-- entities -->
    <li *ngSwitchCase="true" class="nav-item dropdown d-md-down-none" dropdown placement="bottom right">
      <a class="nav-link" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" dropdownToggle (click)="false">
        <i class="icon-list"></i>
      </a>
      <div class="dropdown-menu dropdown-menu-right" *dropdownMenu aria-labelledby="simple-dropdown">
        <div class="dropdown-header text-center"><strong>Entities</strong></div>
        <a class="dropdown-item" routerLink="/entity/deliver-offer" routerLinkActive="active"><i class="fa fa-bell"></i> 接件</a>
        <div class="dropdown-header text-center"><strong>Settings</strong></div>
        <a class="dropdown-item" routerLink="/entity/wx-config" routerLinkActive="active"><i class="fa fa-user"></i> 微信配置</a>
      </div>
    </li>

    <!-- account -->
    <li *ngSwitchCase="true" class="nav-item dropdown" dropdown placement="bottom right" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
      <a class="nav-link" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" dropdownToggle (click)="false">
        <img src="assets/img/avatars/6.jpg" class="img-avatar"/>
      </a>
      <div class="dropdown-menu dropdown-menu-right" *dropdownMenu aria-labelledby="simple-dropdown">
        <div class="dropdown-header text-center"><strong>我的账户</strong></div>
        <a class="dropdown-item" routerLink="/common/settings" routerLinkActive="active"><i class="fa fa-wrench"></i> 设置</a>
        <a class="dropdown-item" routerLink="/common/password" routerLinkActive="active"><i class="fa fa-lock"></i> 密码</a>
        <div class="dropdown-header text-center"></div>
        <a class="dropdown-item" (click)="logout()"><i class="fa fa-power-off"></i> 退出</a>
      </div>
    </li>
    <li *ngSwitchCase="false" class="nav-item dropdown" dropdown placement="bottom right" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
      <a class="nav-link" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" dropdownToggle (click)="false">
        <img src="assets/img/avatars/6.jpg" class="img-avatar"/>
      </a>
    </li>
  </ul>




  <button *ngIf="showAside" class="navbar-toggler d-md-down-none" type="button" appAsideMenuToggler>
    <span class="navbar-toggler-icon"></span>
  </button>
</header>
